package com.one.group.admin.intercepter;


/**
 * {@code @Create:}  2025-09-11  09 : 25
 * {@code @Author:} Cherry
 * {@code @ToUser:} 凡是发生,皆有利于我。
 * ------------------------------------
 * {@code @note:}
 */

@SuppressWarnings({"all"})
public class AdminThreadLocal {
    private static final ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    /**
     * 设置 当前线程的变量值
     *
     * @param adminInfoVO
     */
    public static void set(Long tenantId) {
        threadLocal.set(tenantId);
    }

    /**
     * 获取当前线程的变量值
     *
     * @return
     */
    public static Long get() {
        return threadLocal.get();
    }

    /**
     * 删除当前线程的变量值
     */
    public static void remove() {
        threadLocal.remove();
    }
}
